<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<%@ include file="/common/meta.jsp" %>
	<meta content="ordercheck" name="activemenu" />
	<link href="${ctx}/css/base.css" rel="stylesheet" type="text/css" />
	<link href="${ctx}/css/master.css" rel="stylesheet" type="text/css" />
	<script src="${ctx}/js/jquery.js" type="text/javascript"></script>
	<script src="${ctx}/js/table.js" type="text/javascript"></script>
	<script src="${ctx}/js/droplist.js" type="text/javascript"></script>
	<script type="text/javascript" src="${ctx }/js/DatePicker/WdatePicker.js" ></script>
	<script>
	$(document).ready(function() {
		
	});

	function tosbo(){
		if(confirm("是否确定要转为SAP订单?")){
			document.form.action="${ctx}/ope/draft!tosbo.action";
			document.form.submit();
		}
		return false;
	}

	function totms(){
		if(confirm("是否确定要转为TMS订单?")){
			document.form.action="${ctx}/ope/draft!totms.action";
			document.form.submit();
		}
		return false;
	}
	</script>
</head>
<body>
<jsp:include page="/common/header.jsp" />

	<div class="main_wrap1">
	<div class="main_all">
	<!--左边tab-->
		<div class="left_main">
		  <jsp:include page="/common/menu.jsp" />
		</div>
		<!--左边tab结束-->
		
		<!--右边-->
		<div class="right_box">
		<form name="form" action="${ctx}/ope/draft.action" method="post" id="mainForm">
		<div class="search_box">
			<table class="top_serach_box_registration ">
			<tr>
				<td width="100px"><label><spring:message code="order.biz_type" /></label></td><td><select class="jsdroplist" name="filter_EQL_biztype" id="biz_type" parent="none" onchange="reloadSon('flow_type',this.value)" son="flow_type" init="${param['filter_EQL_biztype']}" action="${ctx}/droplist!buscat.action"><option value=''><spring:message code="select.all" /></option></select></td>
				<td width="100px"><label><spring:message code="order.flow_type" /></label></td><td><select class="jsdroplist" name="filter_EQL_flowType$id" id="flow_type" parent="biz_type" init="${param['filter_EQL_flowType$id']}" action="${ctx}/droplist!flowtype.action"><option value=''><spring:message code="select.all" /></option></select></td>
			</tr>

			<tr>
				<td><label><spring:message code="order.customer_code" /></label></td><td><input name="filter_LIKES_cusCode" value="${param['filter_LIKES_cusCode']}" type="text" size="15"/></td>
				<td><label><spring:message code="order.customer_name" /></label></td><td><input name="filter_LIKES_cusName" value="${param['filter_LIKES_cusName']}" type="text" size="15"/></td>
			</tr>
			<tr>
				<td><label><spring:message code="order.order_date" /></label></td><td><input name="filter_EQD_orderDate" value="${param['filter_EQD_orderDate']}" type="text" onclick="WdatePicker();" size="15" readonly="readonly"/></td>
				<td><label><spring:message code="order.order_status" /></label></td><td>
                <s:select list="@cn.dy.sbo.contants.Constants@DRAFT_MAP" listKey="key" listValue="value"
			name="filter_EQS_status" id="rolecode" value="#parameters.filter_EQS_status"   
			headerKey="" headerValue='全部' theme="simple"/>
                </td>
			</tr>
			
			
			<tr><td colspan="4" align="center"><button><spring:message code="button.search" /></button></td></tr>
			<tr><td colspan="4" align="center"></td></tr>
			</table>
		</div>
		<button onclick="tosbo();return false;">转为SAP订单</button>  <button onclick="totms();return false;">转为TMS订单</button>
		<div >
		<table class="table_list">
		    <tr>
		    <th><input type="checkbox" onclick="checkall(this)" />全选</th>
		    <th width="50px"><spring:message code="order.customer_code" /></th>
		    <th><spring:message code="order.customer_name" /></th>
		    <th width="70px"><spring:message code="order.order_date" /></th>
		    <th><spring:message code="order.import_code" /></th>
		    <th><spring:message code="order.order_code" /></th>
		    <th><spring:message code="order.flow_type" /></th>
		    <th><spring:message code="order.goods_name" /></th>
		    <th><spring:message code="order.order_status" /></th>
		    <th width="30px"><spring:message code="order.detail" /></th>
		    
		    </tr>
			<s:iterator value="page.result" status="var">
		    <tr>
		    <td><input type="checkbox" value="${id}" name="ids"/></td>
		    <td>${cusCode}</td>
		    <td><a title="${cusName}" href="${ctx}/ope/order.action?filter_LIKES_cusCode=${cusCode}">${cusName}</a></td>
		    <td><s:date name="orderDate" format="yyyy-MM-dd"/></td>
		    <td>${importCode}</td>
		    <td>${smallCode}<br/>${bigCode}</td>
		    <td>
		    	<s:if test="biztype == 4">
		    		短途运输
		    	</s:if>
		    	<s:else>
		    	${flowType.name}
		    	</s:else>
		    </td>
		    <td>${goods}</td>
		    <td><s:property value="@cn.dy.sbo.contants.Constants@DRAFT_MAP[status]" /></td>
		    <td><a href="${ctx}/ope/draft!detail.action?id=${id}" target="_blank"><spring:message code="order.detail" /></a></td>
		    </tr> 
		     </s:iterator>        
		    </table>
		<!-- 翻页 start  -->
		
      
      <div class="pagenumber rr">  
	        	<%@ include file="/common/turnpage.jsp" %> 
	          </div>
		<!-- 翻页 end  -->
		</div>
		
		</form>
		</div>
		<!--右边结束-->
		
		</div> 
	<jsp:include page="/common/footer.jsp" />
</div>
</body>
</html>

